namespace EventBus
{
    /// <summary>
    /// 同步事件发送方接口
    /// </summary>
    public interface IEventBroadcast
    {
        /// <summary>
        /// 以同步的方式广播事件
        /// </summary>
        /// <param name="sender">发送方， 一般直接传递this即可</param>
        /// <param name="eventName">事件名</param>
        /// <returns>如果有监听方在监听事件， 返回true， 否则返回false</returns>
        bool Broadcast(object sender, string eventName);

        bool Broadcast<T1>(object sender, string eventName, T1 arg1);

        bool Broadcast<T1, T2>(object sender, string eventName, T1 arg1, T2 arg2);

        bool Broadcast<T1, T2, T3>(object sender, string eventName, T1 arg1, T2 arg2, T3 arg3);

        bool Broadcast<T1, T2, T3, T4>(object sender, string eventName, T1 arg1, T2 arg2, T3 arg3, T4 arg4);

        bool Broadcast<T1, T2, T3, T4, T5>(object sender, string eventName, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);

        bool Broadcast<T1, T2, T3, T4, T5, T6>(object sender, string eventName, T1 arg1, T2 arg2, T3 arg3, T4 arg4,
            T5 arg5, T6 arg6);

        bool Broadcast<T1, T2, T3, T4, T5, T6, T7>(object sender, string eventName, T1 arg1, T2 arg2, T3 arg3, T4 arg4,
            T5 arg5, T6 arg6, T7 arg7);

        bool Broadcast<T1, T2, T3, T4, T5, T6, T7, T8>(object sender, string eventName, T1 arg1, T2 arg2, T3 arg3, T4 arg4,
            T5 arg5, T6 arg6, T7 arg7, T8 arg8);
    }
}